package com.example.example.context;

public class BaseContext {

    private static final ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    public static void setId(Long chatId) {
        threadLocal.set(chatId);
    }

    public static Long getId() {
        return threadLocal.get();
    }

    public static void clear() {
        threadLocal.remove();
    }

}
